package com.md.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LogoutController {


    @GetMapping("/logout")
    public String logout(HttpSession session){
        session.invalidate();//将session信息失效
        return "redirect:login";
    }

}
